<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      /* .cc {
        display: flex;
        vertical-align: center;
        align-items: center;
        align-content: center;
      } */
      #one {
        width: 200px;
        height: 200px;
        border: 1px solid red;
      }
      #two {
        width: 100px;
        height: 100px;
        border: 1px solid yellow;
      }
      #three {
        width: 50px;
        height: 50px;
        border: 1px solid green;
      }
    </style>
  </head>
  <body>
    <div id="one">
      <div id="two">
        <div id="three"></div>
      </div>
    </div>
    <script>
      //事件流 三步走 捕获（从外往内） ，目标， 冒泡（由内向外）
      var oneEle = document.getElementById('one');
      var twoEle = document.getElementById('two');
      var threeEle = document.getElementById('three');
      oneEle.addEventListener('click', function () {
        console.log('one');
      });
      twoEle.addEventListener(
        'click',
        function (event) {
          console.log('two');
          event.stopPropagation()
          

        },
        true
      );
      threeEle.addEventListener('click', function (event) {
        console.log('three');
        
      });
    </script>
  </body>
</html>
